<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/pico/mutex.h Source File</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('mutex_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">mutex.h</div></div>
</div><!--header-->
<div class="contents">
<a href="mutex_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#ifndef _PICO_MUTEX_H</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#define _PICO_MUTEX_H</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;<a class="code" href="lock__core_8h.html">pico/lock_core.h</a>&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="structrecursive__mutex__t.html">   47</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>    <a class="code hl_struct" href="structlock__core.html">lock_core_t</a> core;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>    <a class="code hl_define" href="group__lock__core.html#ga7e5b614312aabaada704b6a2350d39bc">lock_owner_id_t</a> owner;      </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="structrecursive__mutex__t.html#a8e45994023c81c6f2933380905fa316e">   50</a></span>    uint8_t <a class="code hl_variable" href="structrecursive__mutex__t.html#a8e45994023c81c6f2933380905fa316e">enter_count</a>;        </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span><span class="preprocessor">#if PICO_MUTEX_ENABLE_SDK120_COMPATIBILITY</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    <span class="keywordtype">bool</span> recursive;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>} <a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a>;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#if !PICO_MUTEX_ENABLE_SDK120_COMPATIBILITY</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="structmutex.html">   60</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structmutex.html">mutex</a> {</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    <a class="code hl_struct" href="structlock__core.html">lock_core_t</a> core;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <a class="code hl_define" href="group__lock__core.html#ga7e5b614312aabaada704b6a2350d39bc">lock_owner_id_t</a> owner;      </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="group__mutex.html#gac32ff6793a910bc7b48c8b0bb3c47ea7">   63</a></span>} <a class="code hl_typedef" href="group__mutex.html#gac32ff6793a910bc7b48c8b0bb3c47ea7">mutex_t</a>;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="keyword">typedef</span> <a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> <a class="code hl_typedef" href="group__mutex.html#gac32ff6793a910bc7b48c8b0bb3c47ea7">mutex_t</a>; <span class="comment">// they are one and the same when backwards compatible with SDK1.2.0</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__mutex.html#gabe21d7ce624db2df7afe86c4bba400a2">mutex_init</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__mutex.html#ga30d1f9d58564a1799e293451edc2d28e">recursive_mutex_init</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="group__mutex.html#ga65b1c7af0545f478c80b51513d8f6993">   92</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__mutex.html#ga65b1c7af0545f478c80b51513d8f6993">mutex_enter_blocking</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="group__mutex.html#gad11f3d954d96cfdc77025735d35983e1">  102</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__mutex.html#gad11f3d954d96cfdc77025735d35983e1">recursive_mutex_enter_blocking</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"><a class="line" href="group__mutex.html#gaa116de2f28fd7df8fb78b210e07b1ed4">  115</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#gaa116de2f28fd7df8fb78b210e07b1ed4">mutex_try_enter</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx, uint32_t *owner_out);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="group__mutex.html#ga91088e6bd3929dcf86ed12cd92ee2cd8">  129</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#ga91088e6bd3929dcf86ed12cd92ee2cd8">mutex_try_enter_block_until</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until);</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"><a class="line" href="group__mutex.html#gae431bbb90e45cf9ae47130a5635aa2b0">  143</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#gae431bbb90e45cf9ae47130a5635aa2b0">recursive_mutex_try_enter</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx, uint32_t *owner_out);</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span> </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="group__mutex.html#ga32c6e468289a81a49b4bde50a6280f83">  156</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#ga32c6e468289a81a49b4bde50a6280f83">mutex_enter_timeout_ms</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx, uint32_t timeout_ms);</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="group__mutex.html#gad54a0bdb7967571caecb62869bd4194d">  170</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#gad54a0bdb7967571caecb62869bd4194d">recursive_mutex_enter_timeout_ms</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx, uint32_t timeout_ms);</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="group__mutex.html#ga553f33e9692a19f8ad956a8b770858e0">  184</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#ga553f33e9692a19f8ad956a8b770858e0">mutex_enter_timeout_us</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx, uint32_t timeout_us);</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"><a class="line" href="group__mutex.html#gaeeb630a7c13ed3adc567e62c8c737401">  198</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#gaeeb630a7c13ed3adc567e62c8c737401">recursive_mutex_enter_timeout_us</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx, uint32_t timeout_us);</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"><a class="line" href="group__mutex.html#ga69e2f75f0a38378b20c0f2bf9cc7bbe3">  212</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#ga69e2f75f0a38378b20c0f2bf9cc7bbe3">mutex_enter_block_until</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until);</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span> </div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"><a class="line" href="group__mutex.html#ga6ce3ca26cbce71a3e29396264e00e253">  226</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#ga6ce3ca26cbce71a3e29396264e00e253">recursive_mutex_enter_block_until</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx, <a class="code hl_typedef" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until);</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span> </div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"><a class="line" href="group__mutex.html#gaf528c8fbb5f4532758859d18e24e1673">  233</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__mutex.html#gaf528c8fbb5f4532758859d18e24e1673">mutex_exit</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx);</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span> </div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="group__mutex.html#ga2f75321a04ba731f5875353fbaebc345">  240</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="group__mutex.html#ga2f75321a04ba731f5875353fbaebc345">recursive_mutex_exit</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx);</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span> </div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"><a class="line" href="group__mutex.html#gae4b5ca3e872a6823f6580f1388b6585e">  248</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#gae4b5ca3e872a6823f6580f1388b6585e">mutex_is_initialized</a>(<a class="code hl_struct" href="structmutex.html">mutex_t</a> *mtx) {</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>    <span class="keywordflow">return</span> mtx-&gt;core.spin_lock != 0;</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span>}</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span> </div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"><a class="line" href="group__mutex.html#ga97e45154e86f0d206665bbce779d112d">  258</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__mutex.html#ga97e45154e86f0d206665bbce779d112d">recursive_mutex_is_initialized</a>(<a class="code hl_struct" href="structrecursive__mutex__t.html">recursive_mutex_t</a> *mtx) {</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span>    <span class="keywordflow">return</span> mtx-&gt;core.spin_lock != 0;</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>}</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span> </div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"><a class="line" href="group__mutex.html#gaa1b5d9dea897013fc5e40bf102045592">  283</a></span><span class="preprocessor">#define auto_init_mutex(name) static __attribute__((section(&quot;.mutex_array&quot;</span>))) mutex_t name</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span> </div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"><a class="line" href="group__mutex.html#ga3c019cd595a52ee87e06bdf20e427660">  306</a></span><span class="preprocessor">#define auto_init_recursive_mutex(name) static __attribute__((section(&quot;.mutex_array&quot;</span>))) recursive_mutex_t name = { .core = { .spin_lock = (spin_lock_t *)1 <span class="comment">/* marker for runtime_init */</span><span class="preprocessor"> }, .owner = 0, .enter_count = 0 }</span></div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno">  307</span> </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno">  308</span><span class="keywordtype">void</span> runtime_init_mutex(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span> </div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span>}</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup__lock__core_html_ga7e5b614312aabaada704b6a2350d39bc"><div class="ttname"><a href="group__lock__core.html#ga7e5b614312aabaada704b6a2350d39bc">lock_owner_id_t</a></div><div class="ttdeci">#define lock_owner_id_t</div><div class="ttdoc">type to use to store the 'owner' of a lock.</div><div class="ttdef"><b>Definition:</b> lock_core.h:81</div></div>
<div class="ttc" id="agroup__mutex_html_ga2f75321a04ba731f5875353fbaebc345"><div class="ttname"><a href="group__mutex.html#ga2f75321a04ba731f5875353fbaebc345">recursive_mutex_exit</a></div><div class="ttdeci">void recursive_mutex_exit(recursive_mutex_t *mtx)</div><div class="ttdoc">Release ownership of a recursive mutex.</div></div>
<div class="ttc" id="agroup__mutex_html_ga30d1f9d58564a1799e293451edc2d28e"><div class="ttname"><a href="group__mutex.html#ga30d1f9d58564a1799e293451edc2d28e">recursive_mutex_init</a></div><div class="ttdeci">void recursive_mutex_init(recursive_mutex_t *mtx)</div><div class="ttdoc">Initialise a recursive mutex structure.</div><div class="ttdef"><b>Definition:</b> mutex.c:52</div></div>
<div class="ttc" id="agroup__mutex_html_ga32c6e468289a81a49b4bde50a6280f83"><div class="ttname"><a href="group__mutex.html#ga32c6e468289a81a49b4bde50a6280f83">mutex_enter_timeout_ms</a></div><div class="ttdeci">bool mutex_enter_timeout_ms(mutex_t *mtx, uint32_t timeout_ms)</div><div class="ttdoc">Wait for mutex with timeout.</div></div>
<div class="ttc" id="agroup__mutex_html_ga553f33e9692a19f8ad956a8b770858e0"><div class="ttname"><a href="group__mutex.html#ga553f33e9692a19f8ad956a8b770858e0">mutex_enter_timeout_us</a></div><div class="ttdeci">bool mutex_enter_timeout_us(mutex_t *mtx, uint32_t timeout_us)</div><div class="ttdoc">Wait for mutex with timeout.</div></div>
<div class="ttc" id="agroup__mutex_html_ga65b1c7af0545f478c80b51513d8f6993"><div class="ttname"><a href="group__mutex.html#ga65b1c7af0545f478c80b51513d8f6993">mutex_enter_blocking</a></div><div class="ttdeci">void mutex_enter_blocking(mutex_t *mtx)</div><div class="ttdoc">Take ownership of a mutex.</div></div>
<div class="ttc" id="agroup__mutex_html_ga69e2f75f0a38378b20c0f2bf9cc7bbe3"><div class="ttname"><a href="group__mutex.html#ga69e2f75f0a38378b20c0f2bf9cc7bbe3">mutex_enter_block_until</a></div><div class="ttdeci">bool mutex_enter_block_until(mutex_t *mtx, absolute_time_t until)</div><div class="ttdoc">Wait for mutex until a specific time.</div></div>
<div class="ttc" id="agroup__mutex_html_ga6ce3ca26cbce71a3e29396264e00e253"><div class="ttname"><a href="group__mutex.html#ga6ce3ca26cbce71a3e29396264e00e253">recursive_mutex_enter_block_until</a></div><div class="ttdeci">bool recursive_mutex_enter_block_until(recursive_mutex_t *mtx, absolute_time_t until)</div><div class="ttdoc">Wait for mutex until a specific time.</div></div>
<div class="ttc" id="agroup__mutex_html_ga91088e6bd3929dcf86ed12cd92ee2cd8"><div class="ttname"><a href="group__mutex.html#ga91088e6bd3929dcf86ed12cd92ee2cd8">mutex_try_enter_block_until</a></div><div class="ttdeci">bool mutex_try_enter_block_until(mutex_t *mtx, absolute_time_t until)</div><div class="ttdoc">Attempt to take ownership of a mutex until the specified time.</div></div>
<div class="ttc" id="agroup__mutex_html_ga97e45154e86f0d206665bbce779d112d"><div class="ttname"><a href="group__mutex.html#ga97e45154e86f0d206665bbce779d112d">recursive_mutex_is_initialized</a></div><div class="ttdeci">static bool recursive_mutex_is_initialized(recursive_mutex_t *mtx)</div><div class="ttdoc">Test for recursive mutex initialized state.</div><div class="ttdef"><b>Definition:</b> mutex.h:258</div></div>
<div class="ttc" id="agroup__mutex_html_gaa116de2f28fd7df8fb78b210e07b1ed4"><div class="ttname"><a href="group__mutex.html#gaa116de2f28fd7df8fb78b210e07b1ed4">mutex_try_enter</a></div><div class="ttdeci">bool mutex_try_enter(mutex_t *mtx, uint32_t *owner_out)</div><div class="ttdoc">Attempt to take ownership of a mutex.</div></div>
<div class="ttc" id="agroup__mutex_html_gabe21d7ce624db2df7afe86c4bba400a2"><div class="ttname"><a href="group__mutex.html#gabe21d7ce624db2df7afe86c4bba400a2">mutex_init</a></div><div class="ttdeci">void mutex_init(mutex_t *mtx)</div><div class="ttdoc">Initialise a mutex structure.</div><div class="ttdef"><b>Definition:</b> mutex.c:43</div></div>
<div class="ttc" id="agroup__mutex_html_gac32ff6793a910bc7b48c8b0bb3c47ea7"><div class="ttname"><a href="group__mutex.html#gac32ff6793a910bc7b48c8b0bb3c47ea7">mutex_t</a></div><div class="ttdeci">struct mutex mutex_t</div><div class="ttdoc">regular (non recursive) mutex instance</div></div>
<div class="ttc" id="agroup__mutex_html_gad11f3d954d96cfdc77025735d35983e1"><div class="ttname"><a href="group__mutex.html#gad11f3d954d96cfdc77025735d35983e1">recursive_mutex_enter_blocking</a></div><div class="ttdeci">void recursive_mutex_enter_blocking(recursive_mutex_t *mtx)</div><div class="ttdoc">Take ownership of a recursive mutex.</div></div>
<div class="ttc" id="agroup__mutex_html_gad54a0bdb7967571caecb62869bd4194d"><div class="ttname"><a href="group__mutex.html#gad54a0bdb7967571caecb62869bd4194d">recursive_mutex_enter_timeout_ms</a></div><div class="ttdeci">bool recursive_mutex_enter_timeout_ms(recursive_mutex_t *mtx, uint32_t timeout_ms)</div><div class="ttdoc">Wait for recursive mutex with timeout.</div></div>
<div class="ttc" id="agroup__mutex_html_gae431bbb90e45cf9ae47130a5635aa2b0"><div class="ttname"><a href="group__mutex.html#gae431bbb90e45cf9ae47130a5635aa2b0">recursive_mutex_try_enter</a></div><div class="ttdeci">bool recursive_mutex_try_enter(recursive_mutex_t *mtx, uint32_t *owner_out)</div><div class="ttdoc">Attempt to take ownership of a recursive mutex.</div></div>
<div class="ttc" id="agroup__mutex_html_gae4b5ca3e872a6823f6580f1388b6585e"><div class="ttname"><a href="group__mutex.html#gae4b5ca3e872a6823f6580f1388b6585e">mutex_is_initialized</a></div><div class="ttdeci">static bool mutex_is_initialized(mutex_t *mtx)</div><div class="ttdoc">Test for mutex initialized state.</div><div class="ttdef"><b>Definition:</b> mutex.h:248</div></div>
<div class="ttc" id="agroup__mutex_html_gaeeb630a7c13ed3adc567e62c8c737401"><div class="ttname"><a href="group__mutex.html#gaeeb630a7c13ed3adc567e62c8c737401">recursive_mutex_enter_timeout_us</a></div><div class="ttdeci">bool recursive_mutex_enter_timeout_us(recursive_mutex_t *mtx, uint32_t timeout_us)</div><div class="ttdoc">Wait for recursive mutex with timeout.</div></div>
<div class="ttc" id="agroup__mutex_html_gaf528c8fbb5f4532758859d18e24e1673"><div class="ttname"><a href="group__mutex.html#gaf528c8fbb5f4532758859d18e24e1673">mutex_exit</a></div><div class="ttdeci">void mutex_exit(mutex_t *mtx)</div><div class="ttdoc">Release ownership of a mutex.</div></div>
<div class="ttc" id="agroup__timestamp_html_ga8b7f3d602cc053f05bacceeacc257ed8"><div class="ttname"><a href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a></div><div class="ttdeci">uint64_t absolute_time_t</div><div class="ttdoc">An opaque 64 bit timestamp in microseconds.</div><div class="ttdef"><b>Definition:</b> types.h:43</div></div>
<div class="ttc" id="alock__core_8h_html"><div class="ttname"><a href="lock__core_8h.html">lock_core.h</a></div></div>
<div class="ttc" id="astructlock__core_html"><div class="ttname"><a href="structlock__core.html">lock_core</a></div><div class="ttdef"><b>Definition:</b> lock_core.h:53</div></div>
<div class="ttc" id="astructmutex_html"><div class="ttname"><a href="structmutex.html">mutex</a></div><div class="ttdoc">regular (non recursive) mutex instance</div><div class="ttdef"><b>Definition:</b> mutex.h:60</div></div>
<div class="ttc" id="astructrecursive__mutex__t_html"><div class="ttname"><a href="structrecursive__mutex__t.html">recursive_mutex_t</a></div><div class="ttdoc">recursive mutex instance</div><div class="ttdef"><b>Definition:</b> mutex.h:47</div></div>
<div class="ttc" id="astructrecursive__mutex__t_html_a8e45994023c81c6f2933380905fa316e"><div class="ttname"><a href="structrecursive__mutex__t.html#a8e45994023c81c6f2933380905fa316e">recursive_mutex_t::enter_count</a></div><div class="ttdeci">uint8_t enter_count</div><div class="ttdoc">owner id LOCK_INVALID_OWNER_ID for unowned</div><div class="ttdef"><b>Definition:</b> mutex.h:50</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>